//
//  TraineesCell.m
//  CoachsBook
//
//  Created by huiyong li on 2022/8/22.
//

#import "TraineesCell.h"
@interface TraineesCell()

@property(nonatomic,strong) UIView *bjview;
@property(nonatomic,strong) UIImageView *avatarImage;
@property(nonatomic,strong) UILabel *nameLabel;
@end
@implementation TraineesCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

{
    if (self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier])
    {
        [self setupUI];
        self.contentView.backgroundColor = rgba(255, 255, 255, 1);
    }
    return self;
}

- (void)setupUI
{
    self.bjview = [[UIView alloc]initWithFrame:CGRectMake(16, 0, APPwidth-32, 45)];
    self.bjview.backgroundColor = rgba(236, 244, 255, 1);
    self.bjview.layer.cornerRadius = 4;
    self.bjview.layer.masksToBounds = YES;
    [self.contentView addSubview:self.bjview];
    
    
    self.avatarImage = [[UIImageView alloc]initWithFrame:CGRectMake(15, 5, 35, 35)];
    self.avatarImage.layer.cornerRadius = 35/2;
    self.avatarImage.layer.masksToBounds = YES;
    self.avatarImage.image = [UIImage imageNamed:@"headicon"];
    [self.bjview addSubview:self.avatarImage];
    
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(60, 10, APPwidth-152, 26)];
    self.nameLabel.font = kPingFangRegular(14);
    self.nameLabel.textColor = rgba(51, 51, 51, 1);
    self.nameLabel.text = @"马可波罗的小书包";
    [self.bjview addSubview:self.nameLabel];

    
    self.deleteBut = [[UIButton alloc]initWithFrame:CGRectMake(APPwidth-32-50, 5, 35, 35)];
    [self.deleteBut setImage:[UIImage imageNamed:@"mine_deleteTrainees"] forState:UIControlStateNormal];
    [self.bjview addSubview:self.deleteBut];
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
